import type { AxiosRequestConfig, AxiosResponse } from 'axios'

export interface IJJRequestInterceptors<T = AxiosResponse> {
  //请求成功
  requestInterceptor?: (config: AxiosRequestConfig) => AxiosRequestConfig
  //请求失败
  requestInterceptorCatch?: (error: any) => any
  //响应成功
  responseInterceptor?: (res: T) => T
  //响应失败
  responseInterceptorCatch?: (error: any) => any
}
export interface IJJRequestConfig<T = AxiosResponse>
  extends AxiosRequestConfig {
  interceptors?: IJJRequestInterceptors<T>
}
